- return if group.marked_for_deletion?
- remove_form_id = local_assigns.fetch(:remove_form_id, nil)

- date = permanent_deletion_date(Time.now.utc)
.sub-section
  %h4.danger-title= _('Remove group')
  = form_tag(group, method: :delete, id: remove_form_id) do
    %p
      = html_escape(_("This group and its subgroups and projects will be placed in a 'pending deletion' state for %{deletion_delayed_period} days, then permanently deleted on %{date}. The group can be fully restored before that date.")) % { date: tag.strong(date), deletion_delayed_period: deletion_adjourned_period }
      = link_to _('Learn more.'), help_page_path('user/group/index', anchor: 'remove-a-group'), target: '_blank', rel: 'noopener noreferrer'

    = render 'groups/settings/remove_button', group: group, remove_form_id: remove_form_id
